<%@ page language="java" contentType="text/html;charset=UTF-8"
    pageEncoding="UTF-8"%>
<link type="text/css" rel="stylesheet" href="${ctx}/css/dlifestyle/header.css" />
<link type="text/css" rel="stylesheet" href="${ctx}/css/dlifestyle/tips.css" />
<link type="text/css" rel="stylesheet" href="${ctx}/css/dlifestyle/seller.css" />
<script>
//一级菜单点击
function clickFirstMenu(menuId){
	loadLeft(menuId);
}


function exist(){
	layer.confirm('确认注销?', {icon: 3, title:'提示'}, function(index){
	   	$.get("${ctx}/exist",{},function(data){
	   		data = JSON.parse(data);
			if(data.success){
				location.href = "${ctx}";
			}
		});
	    layer.close(index);
	});
    
}

function changePassword(userId){
	msg = "修改密码";
	url = ctx + "/user/changePassword?id=" + userId ;
	index = layer.open({
	      type: 2,
	      //skin: 'layui-layer-lan',
	      title: msg,
	      fix: false,
	      shadeClose: true,
	      scrollbar: false,
	      maxmin: false,
	      edit: true,
	      closeBtn: 1,
	      area: ['500px', '212px'],
	      content: url,
	      btn: ['确定', '取消']
		    ,yes: function(index, layero){ //或者使用btn1
		        //按钮【按钮一】的回调
		    	var iframeWin = window[layero.find('iframe')[0]['name']]; 
		    	iframeWin.savePwd();

		    },cancel: function(index){ //或者使用btn2
		        //按钮【按钮二】的回调
		    }
		});
}

function changeShop(){
	location.href = ctx + "/selectShop";
}
</script>

	<!--头部-->
	<div class="total-head">
	<div class="head">
		<!-- <span class="head-span-logo">LOGO</span> -->
		<span class="head-span-name">
		<img src="${ctx }/images/seller/login/head-title.png" style="position:relative;left:6px;vertical-align:middle;"/>
		</span>
		<span style="display: block;float: left;margin-left: 20px;margin-top: 23px;font-size: 18px;">|&nbsp;&nbsp;商户中心</span>
		
		    <div class="user">
				<img src="${ctx }/images/seller/login/yezhu.png" style="margin-left: 150px;"/>
				<span>商户版</span>
				<span style="margin-left:36px;"> 欢迎您，${sessionScope.user_login.username}</span>
				<span style="margin-left:30px;"><a style="color:#919191;" onclick="exist()"> 退出</a></span>
			</div>
			<div style="height: 33px;width:165px;margin-top:-22px;float:right;background-image: url('${ctx }/images/seller/login/dianpu-back.png');background-repeat:no-repeat;">
				<input id="userId" type="hidden" value="${sessionScope.user_login.id}">
			    <a onclick="changeShop();" style="position: relative;">
				    <img src="${ctx }/images/seller/login/qiehuan.png" style="margin-left:32px;margin-top:8px;"/>
				    <span style="margin-left:16px;color:white;position:relative;top: 5px;font-size: 14px;font-family: '微软雅黑'">店铺切换</span>	
				</a>
			</div>
	</div>
	
	<!-- <div class="header-bg"></div> -->
	
	<!--一级导航-->
   <div class="admin_header_nav">
   <div class="short-cut">
    <div class="admin_nav_list">
      <div class="admin_nav"> 
          <ul class="admin_nav_ul">
          <!-- <div>
				<a href = "javascript:loadLeft('100146355164006600');"><span class="admin_nav_ul_home" style="text-align: center;">首页 </span></a>
			</div> -->
          	  <c:forEach items="${sessionScope.menus}" var="menu" varStatus="menuStatus">
	          	  <li id="firstMenu${menu.id}" name="firstMenu" onclick="clickFirstMenu(${menu.id});" class="admin_nav_ul_li">
	                  <a style="cursor: pointer;">${menu.menuName}</a>
	              </li>
          	  </c:forEach>
          </ul>      
      </div>
    </div>
  </div>
  </div> 
</div>